<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" href="/framework/bootstrap/css/bootstrap-3.0.0.min.css">
    <link rel="stylesheet" href="/css/aui/aui-flex.css">
    <style>
        html, body {
            font-size: 16px;
            color: #313031;
            overflow: hidden;
        }

        #real-nav {
            height: 40px;
            line-height: 40px;
            width: 100%;
            background-color: #fff;
            border-bottom: 1px solid #c7c7c7;
        }

        #real-time {
            color: #39baff;
        }

        .hc-xs-1, .hc-xs-2, .hc-xs-4, .hc-xs-5.hc-xs-8 {
            float: left;
        }

        .hc-xs-1 {
            width: 10%;
        }

        .hc-xs-2 {
            width: 20%;
        }

        .hc-xs-4 {
            width: 40%;
        }

        .hc-xs-5 {
            width: 50%;
        }

        .hc-xs-8 {
            width: 80%;
        }

        .time-tile {
            padding-left: 15px;
        }
        .plc-title {
            width: 100%;
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            text-align: center;
            font-weight: 600;
        }

        .plc-li {
            position: relative;
            width: 100%;
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            text-align: left;
            overflow: hidden;
            padding-left: 45px;
        }

        .plc-li:before {
            position: absolute;
            display: block;
            content: '';
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: #33cc00;
            top: 14px;
            left: 15px;
        }

        .plc-li.r1:before {
            background-color: #ff3333;
        }

        .border-r {
            border-right: 1px solid #c7c7c7;
        }

        .border-b {
            border-bottom: 1px solid #c7c7c7;
        }

        .index-tab {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 100%;
            overflow: auto;
            visibility: hidden;
        }

        .padded-l-15 {
            padding-left: 15px;
        }

        .padded-0-15 {
            padding: 0 15px;
        }

        .padded-0-10 {
            padding: 0 10px;
        }

        .hc-btn {
            display: inline-block;
            height: 24px;
            line-height: 24px;
            font-size: 12px;
            color: #313031;
            padding: 0 12px;
            margin: 0 3px;
            cursor: pointer;
        }

        .hc-btn.checked {
            color: #39baff
        }

        .plc-text {
            text-align: center;
            font-size: 14px;
        }

        .plc-content {
            font-size: 18px;
            color: #0099cc;
            font-weight: 700;
        }
        #time-box{
            position: absolute;
            width: 120px;
            top: 40px;
            left: 0;
            bottom: 0;
            overflow: auto;
            background-color: #c7c7c7;
            z-index: 1;
        }
        #plc-box{
            position: absolute;
            top: 40px;
            left: 120px;
            right: 0;
            bottom: 0;
            overflow: auto;
            z-index: 1;
        }
        .time-item{
            color:#313031;
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            text-align: center;
            cursor: pointer;
        }
        .time-item.checked{
            color:#fff;
            background-color: #39baff;
        }
        #echarts-box{
            position: absolute;
            top: 40px;
            bottom: 0;
            left: 0;
            right: 0;
            overflow: auto;
            z-index: 0;
            background-color: #fff;
        }
        #plc-echarts{
            width: 100%;
            height: 30%;
        }
    </style>
</head>
<body>
<div id="real-nav" class="aui-flex-col">
    <div class="aui-flex-auto padded-l-15">
        <span>历史故障详情</span>
        <div class="hc-btn" onclick="openWin(0)">电控系统基本故障</div>
        <div class="hc-btn" onclick="openWin(1)">变频器故障诊断</div>
        <div class="hc-btn" onclick="openWin(2)">PLC输入输出口状态</div>
    </div>
    <div>
        <div class="btn btn-info" onclick="showEchartsBox()" id="toggle-echart-btn" data-status="0">查看时序图</div>
        <div class="btn btn-link" onclick="history.back();">返回上级</div>
    </div>
</div>
<div id="time-box">
    <div class="time-item" onclick="getHistoryData(this)" data-time="2">22:22:22'11</div>
    <div class="time-item" onclick="getHistoryData(this)" data-time="1">22:22:22'11</div>
</div>
<div id="plc-box">
<div id="index0" class="index-tab aui-flex-col">
    <div class="hc-xs-2 border-r">
        <div class="plc-title">其他信息</div>
        <div class="border-b padded-0-10">
            <div class="plc-li green">急停按下</div>
            <div class="plc-li">相序错误</div>
            <div class="plc-li">门限位打开</div>
            <div class="plc-li">数据记录仪通讯故障</div>
            <div class="plc-li">安全监控系统通讯故障</div>
        </div>
        <div class="plc-title">温度</div>
        <div class="plc-text">
            主起升电机温度<span class="plc-content padded-0-10">0</span>°C
        </div>
        <div class="plc-text">
            副起升电机温度<span class="plc-content padded-0-10">0</span>°C
        </div>
    </div>
    <div class="hc-xs-8 aui-flex-col">
        <div class="hc-xs-5 border-r aui-flex-col">
            <div class="plc-title">主起升故障信息</div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li">主起升上减限位到</div>
                <div class="plc-li">主起升上停限位到</div>
                <div class="plc-li">主起升重锤限位动作</div>
                <div class="plc-li">主起升下减限位到</div>
                <div class="plc-li">主起升下停限位到</div>
                <div class="plc-li">主起升重量预警</div>
                <div class="plc-li">主起升超载报警</div>
                <div class="plc-li">主起升超速故障</div>
            </div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li">主起升短路接触器故障</div>
                <div class="plc-li">主起升制动器故障</div>
                <div class="plc-li">主起升手柄故障</div>
                <div class="plc-li">主起升变频器故障</div>
                <div class="plc-li">主起升电机超温故障</div>
                <div class="plc-li">主起升变频器通讯故障</div>
                <div class="plc-li">主起升制动单元故障</div>
                <div class="plc-li">主起升制动器电源故障</div>
            </div>
            <div class="plc-title">小车故障信息</div>
            <div class="hc-xs-5">
                <div class="plc-li">小车前进停止限位到</div>
                <div class="plc-li">小车前进减速限位到</div>
                <div class="plc-li">小车后退停止限位到</div>
                <div class="plc-li">小车后退减速限位到</div>
            </div>
            <div class="hc-xs-5">
                <div class="plc-li">小车手柄故障</div>
                <div class="plc-li">小车电机热过载故障</div>
                <div class="plc-li">小车变频器故障</div>
                <div class="plc-li">小车制动器及风机电源故障</div>
            </div>
        </div>
        <div class="hc-xs-5 aui-flex-col">
            <div class="plc-title">副起升故障信息</div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li">副起升上减限位到</div>
                <div class="plc-li">副起升上停限位到</div>
                <div class="plc-li">副起升重锤限位动作</div>
                <div class="plc-li">副起升下减限位到</div>
                <div class="plc-li">副起升下停限位到</div>
                <div class="plc-li">副起升重量预警</div>
                <div class="plc-li">副起升超载报警</div>
                <div class="plc-li">副起升超速故障</div>
            </div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li">副起升短路接触器故障</div>
                <div class="plc-li">副起升制动器故障</div>
                <div class="plc-li">副起升手柄故障</div>
                <div class="plc-li">副起升变频器故障</div>
                <div class="plc-li">副起升电机超温故障</div>
                <div class="plc-li">副起升变频器通讯故障</div>
                <div class="plc-li">副起升制动单元故障</div>
                <div class="plc-li">副起升制动器电源故障</div>
            </div>
            <div class="plc-title">大车故障信息</div>
            <div class="hc-xs-5 padded-0-10">
                <div class="plc-li">大车前进停止限位到</div>
                <div class="plc-li">大车前进减速限位到</div>
                <div class="plc-li">大车后退停止限位到</div>
                <div class="plc-li">大车后退减速限位到</div>
            </div>
            <div class="hc-xs-5 padded-0-10">
                <div class="plc-li">大车手柄故障</div>
                <div class="plc-li">大车电机热过载故障</div>
                <div class="plc-li">大车变频器故障</div>
                <div class="plc-li">大车制动器及风机电源故障</div>
            </div>
        </div>
    </div>
</div>
<div id="index1" class="index-tab aui-flex-col">
    <div class="plc-title">主起升变频器故障代码</div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">主起升电机超速故障</div>
        <div class="plc-li">主起升软件过压故障</div>
        <div class="plc-li">主起升硬件过压故障</div>
        <div class="plc-li">主起升欠压故障</div>
        <div class="plc-li">主起升电流检测故障</div>
        <div class="plc-li">主起升电压检测故障</div>
        <div class="plc-li">主起升软件过流故障</div>
        <div class="plc-li">主起升硬件过流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">主起升功率单元故障</div>
        <div class="plc-li">主起升输入缺相故障</div>
        <div class="plc-li">主起升输出缺相故障</div>
        <div class="plc-li">主起升485通信故障</div>
        <div class="plc-li">主起升扩展通信故障</div>
        <div class="plc-li">主起升编码器故障</div>
        <div class="plc-li">主起升存储器故障</div>
        <div class="plc-li">主起升变频器过载故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">主起升电机过载故障</div>
        <div class="plc-li">主起升变频器过热故障</div>
        <div class="plc-li">主起升电机过热故障</div>
        <div class="plc-li">主起升电机对地短路故障</div>
        <div class="plc-li">主起升电机自学习故障</div>
        <div class="plc-li">主起升接触器故障</div>
        <div class="plc-li">主起升加速过电流故障</div>
        <div class="plc-li">主起升减速过电流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">主起升恒速过电流故障</div>
        <div class="plc-li">主起升加速过电压故障</div>
        <div class="plc-li">主起升减速过电压故障</div>
        <div class="plc-li">主起升恒速过电压故障</div>
        <div class="plc-li">主起升逐波限流故障</div>
        <div class="plc-li">主起升速度偏差过大故障</div>
        <div class="plc-li">主起升变频器功率设置故障</div>
        <div class="plc-li">主起升变频器制动器故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">主起升参数辨识超时</div>
        <div class="plc-li">主起升相序辨识超时</div>
        <div class="plc-li">主起升制动器故障2</div>
    </div>
    <div class="plc-title">副起升变频器故障代码</div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">副起升电机超速故障</div>
        <div class="plc-li">副起升软件过压故障</div>
        <div class="plc-li">副起升硬件过压故障</div>
        <div class="plc-li">副起升欠压故障</div>
        <div class="plc-li">副起升电流检测故障</div>
        <div class="plc-li">副起升电压检测故障</div>
        <div class="plc-li">副起升软件过流故障</div>
        <div class="plc-li">副起升硬件过流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">副起升功率单元故障</div>
        <div class="plc-li">副起升输入缺相故障</div>
        <div class="plc-li">副起升输出缺相故障</div>
        <div class="plc-li">副起升485通信故障</div>
        <div class="plc-li">副起升扩展通信故障</div>
        <div class="plc-li">副起升编码器故障</div>
        <div class="plc-li">副起升存储器故障</div>
        <div class="plc-li">副起升变频器过载故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">副起升电机过载故障</div>
        <div class="plc-li">副起升变频器过热故障</div>
        <div class="plc-li">副起升电机过热故障</div>
        <div class="plc-li">副起升电机对地短路故障</div>
        <div class="plc-li">副起升电机自学习故障</div>
        <div class="plc-li">副起升接触器故障</div>
        <div class="plc-li">副起升加速过电流故障</div>
        <div class="plc-li">副起升减速过电流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">副起升恒速过电流故障</div>
        <div class="plc-li">副起升加速过电压故障</div>
        <div class="plc-li">副起升减速过电压故障</div>
        <div class="plc-li">副起升恒速过电压故障</div>
        <div class="plc-li">副起升逐波限流故障</div>
        <div class="plc-li">副起升速度偏差过大故障</div>
        <div class="plc-li">副起升变频器功率设置故障</div>
        <div class="plc-li">副起升变频器制动器故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li">副起升参数辨识超时</div>
        <div class="plc-li">副起升相序辨识超时</div>
        <div class="plc-li">副起升制动器故障2</div>
    </div>
    <div class="plc-title">主起升变频器</div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器电流
            <span class="padded-0-10 plc-content">0</span>A
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器电压
            <span class="padded-0-10 plc-content">0</span>V
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器转速
            <span class="padded-0-10 plc-content">0</span>rpm
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器功率
            <span class="padded-0-10 plc-content">0</span>KW
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器转矩
            <span class="padded-0-10 plc-content">0</span>%
        </div>
    </div>
    <div class="plc-title">副起升变频器</div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器电流
            <span class="padded-0-10 plc-content">0</span>A
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器电压
            <span class="padded-0-10 plc-content">0</span>V
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器转速
            <span class="padded-0-10 plc-content">0</span>rpm
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器功率
            <span class="padded-0-10 plc-content">0</span>KW
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器转矩
            <span class="padded-0-10 plc-content">0</span>%
        </div>
    </div>
    <div class="plc-title"></div>
</div>
<div id="index2" class="index-tab aui-flex-col">
    <div class="plc-title">PLC输入状态</div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I0.0</div>
        <div class="plc-li">I0.1</div>
        <div class="plc-li">I0.2</div>
        <div class="plc-li">I0.3</div>
        <div class="plc-li">I0.4</div>
        <div class="plc-li">I0.5</div>
        <div class="plc-li">I0.6</div>
        <div class="plc-li">I0.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I1.0</div>
        <div class="plc-li">I1.1</div>
        <div class="plc-li">I1.2</div>
        <div class="plc-li">I1.3</div>
        <div class="plc-li">I1.4</div>
        <div class="plc-li">I1.5</div>
        <div class="plc-li">I1.6</div>
        <div class="plc-li">I1.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I2.0</div>
        <div class="plc-li">I2.1</div>
        <div class="plc-li">I2.2</div>
        <div class="plc-li">I2.3</div>
        <div class="plc-li">I2.4</div>
        <div class="plc-li">I2.5</div>
        <div class="plc-li">I2.6</div>
        <div class="plc-li">I2.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I3.0</div>
        <div class="plc-li">I3.1</div>
        <div class="plc-li">I3.2</div>
        <div class="plc-li">I3.3</div>
        <div class="plc-li">I3.4</div>
        <div class="plc-li">I3.5</div>
        <div class="plc-li">I3.6</div>
        <div class="plc-li">I3.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I4.0</div>
        <div class="plc-li">I4.1</div>
        <div class="plc-li">I4.2</div>
        <div class="plc-li">I4.3</div>
        <div class="plc-li">I4.4</div>
        <div class="plc-li">I4.5</div>
        <div class="plc-li">I4.6</div>
        <div class="plc-li">I4.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I5.0</div>
        <div class="plc-li">I5.1</div>
        <div class="plc-li">I5.2</div>
        <div class="plc-li">I5.3</div>
        <div class="plc-li">I5.4</div>
        <div class="plc-li">I5.5</div>
        <div class="plc-li">I5.6</div>
        <div class="plc-li">I5.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I6.0</div>
        <div class="plc-li">I6.1</div>
        <div class="plc-li">I6.2</div>
        <div class="plc-li">I6.3</div>
        <div class="plc-li">I6.4</div>
        <div class="plc-li">I6.5</div>
        <div class="plc-li">I6.6</div>
        <div class="plc-li">I6.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I7.0</div>
        <div class="plc-li">I7.1</div>
        <div class="plc-li">I7.2</div>
        <div class="plc-li">I7.3</div>
        <div class="plc-li">I7.4</div>
        <div class="plc-li">I7.5</div>
        <div class="plc-li">I7.6</div>
        <div class="plc-li">I7.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I8.0</div>
        <div class="plc-li">I8.1</div>
        <div class="plc-li">I8.2</div>
        <div class="plc-li">I8.3</div>
        <div class="plc-li">I8.4</div>
        <div class="plc-li">I8.5</div>
        <div class="plc-li">I8.6</div>
        <div class="plc-li">I8.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li">I9.0</div>
        <div class="plc-li">I9.1</div>
        <div class="plc-li">I9.2</div>
        <div class="plc-li">I9.3</div>
        <div class="plc-li">I9.4</div>
        <div class="plc-li">I9.5</div>
        <div class="plc-li">I9.6</div>
        <div class="plc-li">I9.7</div>
    </div>
    <div class="plc-title">PLC输出状态</div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li">Q0.0</div>
        <div class="plc-li">Q0.1</div>
        <div class="plc-li">Q0.2</div>
        <div class="plc-li">Q0.3</div>
        <div class="plc-li">Q0.4</div>
        <div class="plc-li">Q0.5</div>
        <div class="plc-li">Q0.6</div>
        <div class="plc-li">Q0.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li">Q1.0</div>
        <div class="plc-li">Q1.1</div>
        <div class="plc-li">Q1.2</div>
        <div class="plc-li">Q1.3</div>
        <div class="plc-li">Q1.4</div>
        <div class="plc-li">Q1.5</div>
        <div class="plc-li">Q1.6</div>
        <div class="plc-li">Q1.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li">Q2.0</div>
        <div class="plc-li">Q2.1</div>
        <div class="plc-li">Q2.2</div>
        <div class="plc-li">Q2.3</div>
        <div class="plc-li">Q2.4</div>
        <div class="plc-li">Q2.5</div>
        <div class="plc-li">Q2.6</div>
        <div class="plc-li">Q2.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li">Q3.0</div>
        <div class="plc-li">Q3.1</div>
        <div class="plc-li">Q3.2</div>
        <div class="plc-li">Q3.3</div>
        <div class="plc-li">Q3.4</div>
        <div class="plc-li">Q3.5</div>
        <div class="plc-li">Q3.6</div>
        <div class="plc-li">Q3.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li">Q4.0</div>
        <div class="plc-li">Q4.1</div>
        <div class="plc-li">Q4.2</div>
        <div class="plc-li">Q4.3</div>
        <div class="plc-li">Q4.4</div>
        <div class="plc-li">Q4.5</div>
        <div class="plc-li">Q4.6</div>
        <div class="plc-li">Q4.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li">Q5.0</div>
        <div class="plc-li">Q5.1</div>
        <div class="plc-li">Q5.2</div>
        <div class="plc-li">Q5.3</div>
        <div class="plc-li">Q5.4</div>
        <div class="plc-li">Q5.5</div>
        <div class="plc-li">Q5.6</div>
        <div class="plc-li">Q5.7</div>
    </div>
</div>
</div>
</body>
</html>
<script src="/framework/jquery/jquery-3.1.1.min.js"></script>
<script src="/framework/template.js"></script>
<script src="/js/index.js"></script>
<script type="text/html" id="index0-tpl">
    <div class="hc-xs-2 border-r">
        <div class="plc-title">其他信息</div>
        <div class="border-b padded-0-10">
            <div class="plc-li r{{VB3007[0]}}">急停按下</div>
            <div class="plc-li r{{VB3007[1]}}">相序错误</div>
            <div class="plc-li r{{VB3007[2]}}">门限位打开</div>
            <div class="plc-li r{{VB3007[3]}}">数据记录仪通讯故障</div>
            <div class="plc-li r{{VB3007[4]}}">安全监控系统通讯故障</div>
        </div>
        <div class="plc-title">温度</div>
        <div class="plc-text">
            主起升电机温度<span class="padded-0-10 plc-content">{{VB3034[0]}}</span>°C
        </div>
        <div class="plc-text">
            副起升电机温度<span class="padded-0-10 plc-content">{{VB3035[0]}}</span>°C
        </div>
    </div>
    <div class="hc-xs-8 aui-flex-col">
        <div class="hc-xs-5 border-r aui-flex-col">
            <div class="plc-title">主起升故障信息</div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li r{{VB3000[0]}}">主起升上减限位到</div>
                <div class="plc-li r{{VB3000[1]}}">主起升上停限位到</div>
                <div class="plc-li r{{VB3000[2]}}">主起升重锤限位动作</div>
                <div class="plc-li r{{VB3000[3]}}">主起升下减限位到</div>
                <div class="plc-li r{{VB3000[4]}}">主起升下停限位到</div>
                <div class="plc-li r{{VB3000[5]}}">主起升重量预警</div>
                <div class="plc-li r{{VB3000[6]}}">主起升超载报警</div>
                <div class="plc-li r{{VB3000[7]}}">主起升超速故障</div>
            </div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li r{{VB3001[0]}}">主起升短路接触器故障</div>
                <div class="plc-li r{{VB3001[1]}}">主起升制动器故障</div>
                <div class="plc-li r{{VB3001[2]}}">主起升手柄故障</div>
                <div class="plc-li r{{VB3001[3]}}">主起升变频器故障</div>
                <div class="plc-li r{{VB3001[4]}}">主起升电机超温故障</div>
                <div class="plc-li r{{VB3001[5]}}">主起升变频器通讯故障</div>
                <div class="plc-li r{{VB3001[6]}}">主起升制动单元故障</div>
                <div class="plc-li r{{VB3001[7]}}">主起升制动器电源故障</div>
            </div>
            <div class="plc-title">小车故障信息</div>
            <div class="hc-xs-5">
                <div class="plc-li r{{VB3004[0]}}">小车前进停止限位到</div>
                <div class="plc-li r{{VB3004[1]}}">小车前进减速限位到</div>
                <div class="plc-li r{{VB3004[2]}}">小车后退停止限位到</div>
                <div class="plc-li r{{VB3004[3]}}">小车后退减速限位到</div>
            </div>
            <div class="hc-xs-5">
                <div class="plc-li r{{VB3004[4]}}">小车手柄故障</div>
                <div class="plc-li r{{VB3004[5]}}">小车电机热过载故障</div>
                <div class="plc-li r{{VB3004[6]}}">小车变频器故障</div>
                <div class="plc-li r{{VB3004[7]}}">小车制动器及风机电源故障</div>
            </div>
        </div>
        <div class="hc-xs-5 aui-flex-col">
            <div class="plc-title">副起升故障信息</div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li r{{VB3002[0]}}">副起升上减限位到</div>
                <div class="plc-li r{{VB3002[1]}}">副起升上停限位到</div>
                <div class="plc-li r{{VB3002[2]}}">副起升重锤限位动作</div>
                <div class="plc-li r{{VB3002[3]}}">副起升下减限位到</div>
                <div class="plc-li r{{VB3002[4]}}">副起升下停限位到</div>
                <div class="plc-li r{{VB3002[5]}}">副起升重量预警</div>
                <div class="plc-li r{{VB3002[6]}}">副起升超载报警</div>
                <div class="plc-li r{{VB3002[7]}}">副起升超速故障</div>
            </div>
            <div class="hc-xs-5 border-b padded-0-10">
                <div class="plc-li r{{VB3003[0]}}">副起升短路接触器故障</div>
                <div class="plc-li r{{VB3003[1]}}">副起升制动器故障</div>
                <div class="plc-li r{{VB3003[2]}}">副起升手柄故障</div>
                <div class="plc-li r{{VB3003[3]}}">副起升变频器故障</div>
                <div class="plc-li r{{VB3003[4]}}">副起升电机超温故障</div>
                <div class="plc-li r{{VB3003[5]}}">副起升变频器通讯故障</div>
                <div class="plc-li r{{VB3003[6]}}">副起升制动单元故障</div>
                <div class="plc-li r{{VB3003[7]}}">副起升制动器电源故障</div>
            </div>
            <div class="plc-title">大车故障信息</div>
            <div class="hc-xs-5 padded-0-10">
                <div class="plc-li r{{VB3004[0]}}">大车左停限位到</div>
                <div class="plc-li r{{VB3004[1]}}">大车左减限位到</div>
                <div class="plc-li r{{VB3004[2]}}">大车右停限位到</div>
                <div class="plc-li r{{VB3004[3]}}">大车右减限位到</div>
            </div>
            <div class="hc-xs-5 padded-0-10">
                <div class="plc-li r{{VB3004[4]}}">大车手柄故障</div>
                <div class="plc-li r{{VB3004[5]}}">大车电机热过载故障</div>
                <div class="plc-li r{{VB3004[6]}}">大车变频器故障</div>
                <div class="plc-li r{{VB3004[7]}}">大车制动器及风机电源故障</div>
            </div>
        </div>
    </div>
</script>
<script type="text/html" id="index1-tpl">
    <div class="plc-title">主起升变频器故障代码</div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3008[0]}}">主起升电机超速故障</div>
        <div class="plc-li r{{VB3008[1]}}">主起升软件过压故障</div>
        <div class="plc-li r{{VB3008[2]}}">主起升硬件过压故障</div>
        <div class="plc-li r{{VB3008[3]}}">主起升欠压故障</div>
        <div class="plc-li r{{VB3008[4]}}">主起升电流检测故障</div>
        <div class="plc-li r{{VB3008[5]}}">主起升电压检测故障</div>
        <div class="plc-li r{{VB3008[6]}}">主起升软件过流故障</div>
        <div class="plc-li r{{VB3008[7]}}">主起升硬件过流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3009[0]}}">主起升功率单元故障</div>
        <div class="plc-li r{{VB3009[1]}}">主起升输入缺相故障</div>
        <div class="plc-li r{{VB3009[2]}}">主起升输出缺相故障</div>
        <div class="plc-li r{{VB3009[3]}}">主起升485通信故障</div>
        <div class="plc-li r{{VB3009[4]}}">主起升扩展通信故障</div>
        <div class="plc-li r{{VB3009[5]}}">主起升编码器故障</div>
        <div class="plc-li r{{VB3009[6]}}">主起升存储器故障</div>
        <div class="plc-li r{{VB3009[7]}}">主起升变频器过载故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3010[0]}}">主起升电机过载故障</div>
        <div class="plc-li r{{VB3010[1]}}">主起升变频器过热故障</div>
        <div class="plc-li r{{VB3010[2]}}">主起升电机过热故障</div>
        <div class="plc-li r{{VB3010[3]}}">主起升电机对地短路故障</div>
        <div class="plc-li r{{VB3010[4]}}">主起升电机自学习故障</div>
        <div class="plc-li r{{VB3010[5]}}">主起升接触器故障</div>
        <div class="plc-li r{{VB3010[6]}}">主起升加速过电流故障</div>
        <div class="plc-li r{{VB3010[7]}}">主起升减速过电流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3011[0]}}">主起升恒速过电流故障</div>
        <div class="plc-li r{{VB3011[1]}}">主起升加速过电压故障</div>
        <div class="plc-li r{{VB3011[2]}}">主起升减速过电压故障</div>
        <div class="plc-li r{{VB3011[3]}}">主起升恒速过电压故障</div>
        <div class="plc-li r{{VB3011[4]}}">主起升逐波限流故障</div>
        <div class="plc-li r{{VB3011[5]}}">主起升速度偏差过大故障</div>
        <div class="plc-li r{{VB3011[6]}}">主起升变频器功率设置故障</div>
        <div class="plc-li r{{VB3011[7]}}">主起升变频器制动器故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3012[0]}}">主起升参数辨识超时</div>
        <div class="plc-li r{{VB3012[1]}}">主起升相序辨识超时</div>
        <div class="plc-li r{{VB3012[2]}}">主起升制动器故障2</div>
    </div>
    <div class="plc-title">副起升变频器故障代码</div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3013[0]}}">副起升电机超速故障</div>
        <div class="plc-li r{{VB3013[1]}}">副起升软件过压故障</div>
        <div class="plc-li r{{VB3013[2]}}">副起升硬件过压故障</div>
        <div class="plc-li r{{VB3013[3]}}">副起升欠压故障</div>
        <div class="plc-li r{{VB3013[4]}}">副起升电流检测故障</div>
        <div class="plc-li r{{VB3013[5]}}">副起升电压检测故障</div>
        <div class="plc-li r{{VB3013[6]}}">副起升软件过流故障</div>
        <div class="plc-li r{{VB3013[7]}}">副起升硬件过流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3014[0]}}">副起升功率单元故障</div>
        <div class="plc-li r{{VB3014[1]}}">副起升输入缺相故障</div>
        <div class="plc-li r{{VB3014[2]}}">副起升输出缺相故障</div>
        <div class="plc-li r{{VB3014[3]}}">副起升485通信故障</div>
        <div class="plc-li r{{VB3014[4]}}">副起升扩展通信故障</div>
        <div class="plc-li r{{VB3014[5]}}">副起升编码器故障</div>
        <div class="plc-li r{{VB3014[6]}}">副起升存储器故障</div>
        <div class="plc-li r{{VB3014[7]}}">副起升变频器过载故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3015[0]}}">副起升电机过载故障</div>
        <div class="plc-li r{{VB3015[1]}}">副起升变频器过热故障</div>
        <div class="plc-li r{{VB3015[2]}}">副起升电机过热故障</div>
        <div class="plc-li r{{VB3015[3]}}">副起升电机对地短路故障</div>
        <div class="plc-li r{{VB3015[4]}}">副起升电机自学习故障</div>
        <div class="plc-li r{{VB3015[5]}}">副起升接触器故障</div>
        <div class="plc-li r{{VB3015[6]}}">副起升加速过电流故障</div>
        <div class="plc-li r{{VB3015[7]}}">副起升减速过电流故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3016[0]}}">副起升恒速过电流故障</div>
        <div class="plc-li r{{VB3016[1]}}">副起升加速过电压故障</div>
        <div class="plc-li r{{VB3016[2]}}">副起升减速过电压故障</div>
        <div class="plc-li r{{VB3016[3]}}">副起升恒速过电压故障</div>
        <div class="plc-li r{{VB3016[4]}}">副起升逐波限流故障</div>
        <div class="plc-li r{{VB3016[5]}}">副起升速度偏差过大故障</div>
        <div class="plc-li r{{VB3016[6]}}">副起升变频器功率设置故障</div>
        <div class="plc-li r{{VB3016[7]}}">副起升变频器制动器故障</div>
    </div>
    <div class="hc-xs-2 border-b padded-0-10">
        <div class="plc-li r{{VB3017[0]}}">副起升参数辨识超时</div>
        <div class="plc-li r{{VB3017[1]}}">副起升相序辨识超时</div>
        <div class="plc-li r{{VB3017[2]}}">副起升制动器故障2</div>
    </div>
    <div class="plc-title">主起升变频器</div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器电流
            <span class="padded-0-10 plc-content">{{VW3036[0]}}</span>A
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器电压
            <span class="padded-0-10 plc-content">{{VW3038[0]}}</span>V
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器转速
            <span class="padded-0-10 plc-content">{{VW3040[0]}}</span>rpm
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器功率
            <span class="padded-0-10 plc-content">{{VW3042[0]}}</span>KW
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">主起升变频器转矩
            <span class="padded-0-10 plc-content">{{VW3044[0]}}</span>%
        </div>
    </div>
    <div class="plc-title">副起升变频器</div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器电流
            <span class="padded-0-10 plc-content">{{VW3046[0]}}</span>A
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器电压
            <span class="padded-0-10 plc-content">{{VW3048[0]}}</span>V
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器转速
            <span class="padded-0-10 plc-content">{{VW3050[0]}}</span>rpm
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器功率
            <span class="padded-0-10 plc-content">{{VW3052[0]}}</span>KW
        </div>
    </div>
    <div class="hc-xs-2">
        <div class="plc-text">副起升变频器转矩
            <span class="padded-0-10 plc-content">{{VW3054[0]}}</span>%
        </div>
    </div>
    <div class="plc-title"></div>
</script>
<script type="text/html" id="index2-tpl">
    <div class="plc-title">PLC输入状态</div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3018[0]}}">I0.0</div>
        <div class="plc-li r{{VB3018[1]}}">I0.1</div>
        <div class="plc-li r{{VB3018[2]}}">I0.2</div>
        <div class="plc-li r{{VB3018[3]}}">I0.3</div>
        <div class="plc-li r{{VB3018[4]}}">I0.4</div>
        <div class="plc-li r{{VB3018[5]}}">I0.5</div>
        <div class="plc-li r{{VB3018[6]}}">I0.6</div>
        <div class="plc-li r{{VB3018[7]}}">I0.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3019[0]}}">I1.0</div>
        <div class="plc-li r{{VB3019[1]}}">I1.1</div>
        <div class="plc-li r{{VB3019[2]}}">I1.2</div>
        <div class="plc-li r{{VB3019[3]}}">I1.3</div>
        <div class="plc-li r{{VB3019[4]}}">I1.4</div>
        <div class="plc-li r{{VB3019[5]}}">I1.5</div>
        <div class="plc-li r{{VB3019[6]}}">I1.6</div>
        <div class="plc-li r{{VB3019[7]}}">I1.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3020[0]}}">I2.0</div>
        <div class="plc-li r{{VB3020[1]}}">I2.1</div>
        <div class="plc-li r{{VB3020[2]}}">I2.2</div>
        <div class="plc-li r{{VB3020[3]}}">I2.3</div>
        <div class="plc-li r{{VB3020[4]}}">I2.4</div>
        <div class="plc-li r{{VB3020[5]}}">I2.5</div>
        <div class="plc-li r{{VB3020[6]}}">I2.6</div>
        <div class="plc-li r{{VB3020[7]}}">I2.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3021[0]}}">I3.0</div>
        <div class="plc-li r{{VB3021[1]}}">I3.1</div>
        <div class="plc-li r{{VB3021[2]}}">I3.2</div>
        <div class="plc-li r{{VB3021[3]}}">I3.3</div>
        <div class="plc-li r{{VB3021[4]}}">I3.4</div>
        <div class="plc-li r{{VB3021[5]}}">I3.5</div>
        <div class="plc-li r{{VB3021[6]}}">I3.6</div>
        <div class="plc-li r{{VB3021[7]}}">I3.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3022[0]}}">I4.0</div>
        <div class="plc-li r{{VB3022[1]}}">I4.1</div>
        <div class="plc-li r{{VB3022[2]}}">I4.2</div>
        <div class="plc-li r{{VB3022[3]}}">I4.3</div>
        <div class="plc-li r{{VB3022[4]}}">I4.4</div>
        <div class="plc-li r{{VB3022[5]}}">I4.5</div>
        <div class="plc-li r{{VB3022[6]}}">I4.6</div>
        <div class="plc-li r{{VB3022[7]}}">I4.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3023[0]}}">I5.0</div>
        <div class="plc-li r{{VB3023[1]}}">I5.1</div>
        <div class="plc-li r{{VB3023[2]}}">I5.2</div>
        <div class="plc-li r{{VB3023[3]}}">I5.3</div>
        <div class="plc-li r{{VB3023[4]}}">I5.4</div>
        <div class="plc-li r{{VB3023[5]}}">I5.5</div>
        <div class="plc-li r{{VB3023[6]}}">I5.6</div>
        <div class="plc-li r{{VB3023[7]}}">I5.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3024[0]}}">I6.0</div>
        <div class="plc-li r{{VB3024[1]}}">I6.1</div>
        <div class="plc-li r{{VB3024[2]}}">I6.2</div>
        <div class="plc-li r{{VB3024[3]}}">I6.3</div>
        <div class="plc-li r{{VB3024[4]}}">I6.4</div>
        <div class="plc-li r{{VB3024[5]}}">I6.5</div>
        <div class="plc-li r{{VB3024[6]}}">I6.6</div>
        <div class="plc-li r{{VB3024[7]}}">I6.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3025[0]}}">I7.0</div>
        <div class="plc-li r{{VB3025[1]}}">I7.1</div>
        <div class="plc-li r{{VB3025[2]}}">I7.2</div>
        <div class="plc-li r{{VB3025[3]}}">I7.3</div>
        <div class="plc-li r{{VB3025[4]}}">I7.4</div>
        <div class="plc-li r{{VB3025[5]}}">I7.5</div>
        <div class="plc-li r{{VB3025[6]}}">I7.6</div>
        <div class="plc-li r{{VB3025[7]}}">I7.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3026[0]}}">I8.0</div>
        <div class="plc-li r{{VB3026[1]}}">I8.1</div>
        <div class="plc-li r{{VB3026[2]}}">I8.2</div>
        <div class="plc-li r{{VB3026[3]}}">I8.3</div>
        <div class="plc-li r{{VB3026[4]}}">I8.4</div>
        <div class="plc-li r{{VB3026[5]}}">I8.5</div>
        <div class="plc-li r{{VB3026[6]}}">I8.6</div>
        <div class="plc-li r{{VB3026[7]}}">I8.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10 border-b">
        <div class="plc-li r{{VB3027[0]}}">I9.0</div>
        <div class="plc-li r{{VB3027[1]}}">I9.1</div>
        <div class="plc-li r{{VB3027[2]}}">I9.2</div>
        <div class="plc-li r{{VB3027[3]}}">I9.3</div>
        <div class="plc-li r{{VB3027[4]}}">I9.4</div>
        <div class="plc-li r{{VB3027[5]}}">I9.5</div>
        <div class="plc-li r{{VB3027[6]}}">I9.6</div>
        <div class="plc-li r{{VB3027[7]}}">I9.7</div>
    </div>
    <div class="plc-title">PLC输出状态</div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li r{{VB3028[0]}}">Q0.0</div>
        <div class="plc-li r{{VB3028[1]}}">Q0.1</div>
        <div class="plc-li r{{VB3028[2]}}">Q0.2</div>
        <div class="plc-li r{{VB3028[3]}}">Q0.3</div>
        <div class="plc-li r{{VB3028[4]}}">Q0.4</div>
        <div class="plc-li r{{VB3028[5]}}">Q0.5</div>
        <div class="plc-li r{{VB3028[6]}}">Q0.6</div>
        <div class="plc-li r{{VB3028[7]}}">Q0.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li r{{VB3029[0]}}">Q1.0</div>
        <div class="plc-li r{{VB3029[1]}}">Q1.1</div>
        <div class="plc-li r{{VB3029[2]}}">Q1.2</div>
        <div class="plc-li r{{VB3029[3]}}">Q1.3</div>
        <div class="plc-li r{{VB3029[4]}}">Q1.4</div>
        <div class="plc-li r{{VB3029[5]}}">Q1.5</div>
        <div class="plc-li r{{VB3029[6]}}">Q1.6</div>
        <div class="plc-li r{{VB3029[7]}}">Q1.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li r{{VB3030[0]}}">Q2.0</div>
        <div class="plc-li r{{VB3030[1]}}">Q2.1</div>
        <div class="plc-li r{{VB3030[2]}}">Q2.2</div>
        <div class="plc-li r{{VB3030[3]}}">Q2.3</div>
        <div class="plc-li r{{VB3030[4]}}">Q2.4</div>
        <div class="plc-li r{{VB3030[5]}}">Q2.5</div>
        <div class="plc-li r{{VB3030[6]}}">Q2.6</div>
        <div class="plc-li r{{VB3030[7]}}">Q2.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li r{{VB3031[0]}}">Q3.0</div>
        <div class="plc-li r{{VB3031[1]}}">Q3.1</div>
        <div class="plc-li r{{VB3031[2]}}">Q3.2</div>
        <div class="plc-li r{{VB3031[3]}}">Q3.3</div>
        <div class="plc-li r{{VB3031[4]}}">Q3.4</div>
        <div class="plc-li r{{VB3031[5]}}">Q3.5</div>
        <div class="plc-li r{{VB3031[6]}}">Q3.6</div>
        <div class="plc-li r{{VB3031[7]}}">Q3.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li r{{VB3032[0]}}">Q4.0</div>
        <div class="plc-li r{{VB3032[1]}}">Q4.1</div>
        <div class="plc-li r{{VB3032[2]}}">Q4.2</div>
        <div class="plc-li r{{VB3032[3]}}">Q4.3</div>
        <div class="plc-li r{{VB3032[4]}}">Q4.4</div>
        <div class="plc-li r{{VB3032[5]}}">Q4.5</div>
        <div class="plc-li r{{VB3032[6]}}">Q4.6</div>
        <div class="plc-li r{{VB3032[7]}}">Q4.7</div>
    </div>
    <div class="hc-xs-1 padded-0-10">
        <div class="plc-li r{{VB3033[0]}}">Q5.0</div>
        <div class="plc-li r{{VB3033[1]}}">Q5.1</div>
        <div class="plc-li r{{VB3033[2]}}">Q5.2</div>
        <div class="plc-li r{{VB3033[3]}}">Q5.3</div>
        <div class="plc-li r{{VB3033[4]}}">Q5.4</div>
        <div class="plc-li r{{VB3033[5]}}">Q5.5</div>
        <div class="plc-li r{{VB3033[6]}}">Q5.6</div>
        <div class="plc-li r{{VB3033[7]}}">Q5.7</div>
    </div>
</script>
<script type="text/html" id="time-tpl">
{{each list as it i}}
<div class="time-item" onclick="getHistoryData(this)" data-time="{{i}}">{{it}}</div>
{{/each}}
</script>
<script>
    var res = {
        "VW3048": ["0"],
        "VW3046": ["0"],
        "VB3018": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "Time": "12:30:30",
        "VB3019": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3012": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3034": ["33"],
        "VB3013": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3035": ["0"],
        "VB3010": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3032": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3011": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3033": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3016": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3014": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3015": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VW3052": ["0"],
        "VW3050": ["0"],
        "VB3030": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3031": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VW3054": ["0"],
        "VW3038": ["0"],
        "VW3036": ["0"],
        "VB3009": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3007": ["0", "1", "0", "0", "0", "0", "0", "0"],
        "VB3029": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3008": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3001": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3017": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3023": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3002": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3024": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3021": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3000": ["0", "1", "0", "0", "0", "0", "0", "0"],
        "VB3022": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3005": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3027": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3006": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3028": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3003": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3025": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3004": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VB3026": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VW3040": ["0"],
        "VW3044": ["0"],
        "VB3020": ["0", "0", "0", "0", "0", "0", "0", "0"],
        "VW3042": ["0"]
    };
    var ii = 0;
    var timeArr=[];
    var $echartBox=$('#echarts-box');
    var $echartBtn=$('#toggle-echart-btn');

    openWin(0);
    timeDemo();
    function _template(domId, tplId, data, isAppend) {
        var temp = template(tplId, data);
        if (!isAppend) {
            $('#' + domId).html(temp);
        } else {
            $('#' + domId).append(temp);
        }
    }
    function getTimeData(el) {
        var $this = $(el);
        if ($this.hasClass('checked'))return false;
        $('.time-item').removeClass('checked');
        $this.addClass('checked');
        fillData();
    }
    function fillData() {
        _template('index0', 'index0-tpl', res);
        _template('index1', 'index1-tpl', res);
        _template('index2', 'index2-tpl', res);
        ii++;
        res.VB3007[1] = ii % 2;
    }
    function openWin(index) {
        $('.hc-btn.checked').removeClass('checked');
        $('.hc-btn:eq(' + index + ')').addClass('checked')
        $('.index-tab').css('visibility', 'hidden');
        $('#index' + index).css('visibility', 'visible');
    }
    function _callSvr() {
        $.ajax({
            cache: false,
            async: false,
            type: 'POST',
            url: 'http://hcdc2.hchn.com:9090/svr/eqpt/getRealWorking',
            data: {"termCode": "PT17060001"},
            dataType: 'json',
            success: function (ret) {
                console.log(JSON.stringify(ret))
            },
            error: function () {
                alert("网络错误,请稍后重试");
            },
            complete: function () {
            }
        });
    }
    function getHistoryData(el){
        var $this=$(el);
        if($this.hasClass('checked'))return false;
        $('.time-item.checked').removeClass('checked');
        $this.addClass('checked');
    }
    function showEchartsBox(){
       location.href='../tdm/plc_echarts.html';
    }
    function formatDate(date){
        var time=date?new Date(date):new Date();
        var hour=time.getHours();
        var min=time.getMinutes();
        var sec=time.getSeconds();
        var ms=Math.round(time.getMilliseconds()/10,0);
        if(hour<10)hour='0'+hour;
        if(min<10)min='0'+min;
        if(sec<10)sec='0'+sec;
        if(ms<10)ms='0'+ms;
        return hour+':'+min+':'+sec+'\''+ms;
    }
    function timeDemo(){
        var time=new Date().getTime();
        for(var i=0;i<300;i++){
            timeArr.push(formatDate(time+i));
        }
        _template('time-box','time-tpl',{list:timeArr});
    }
    function zenderPlcDemo(){
        var echart=echart.init(document.getElementById('plc-echarts'));
        var ops={
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
        }
    }
</script>